/***** MARC 21 (Library of Congress) country codes *****/

program k_marc
version 8.2

replace NAMES_STD = "Afghanistan" if NAMES_STD == "af"
replace NAMES_STD = "Albania" if NAMES_STD == "aa"
replace NAMES_STD = "Algeria" if NAMES_STD == "ae"
replace NAMES_STD = "American Samoa" if NAMES_STD == "as"
replace NAMES_STD = "Andorra" if NAMES_STD == "an"
replace NAMES_STD = "Angola" if NAMES_STD == "ao"
replace NAMES_STD = "Anguilla" if NAMES_STD == "am"
replace NAMES_STD = "Antigua and Barbuda" if NAMES_STD == "aq"
replace NAMES_STD = "Argentina" if NAMES_STD == "ag"
replace NAMES_STD = "Armenia" if NAMES_STD == "ai" | NAMES_STD == "air"
replace NAMES_STD = "Aruba" if NAMES_STD == "aw"
replace NAMES_STD = "Australia" if NAMES_STD == "at"
replace NAMES_STD = "Austria" if NAMES_STD == "au"
replace NAMES_STD = "Azerbaijan" if NAMES_STD == "aj" | NAMES_STD == "ajr"
replace NAMES_STD = "Bahamas" if NAMES_STD == "bf"
replace NAMES_STD = "Bahrain" if NAMES_STD == "ba"
replace NAMES_STD = "Bangladesh" if NAMES_STD == "bg"
replace NAMES_STD = "Barbados" if NAMES_STD == "bb"
replace NAMES_STD = "Belarus" if NAMES_STD == "bw" | NAMES_STD == "bwr"
replace NAMES_STD = "Belgium" if NAMES_STD == "be"
replace NAMES_STD = "Belize" if NAMES_STD == "bh"
replace NAMES_STD = "Benin" if NAMES_STD == "dm"
replace NAMES_STD = "Bermuda" if NAMES_STD == "bm"
replace NAMES_STD = "Bhutan" if NAMES_STD == "bt"
replace NAMES_STD = "Bolivia" if NAMES_STD == "bo"
replace NAMES_STD = "Bosnia and Herzegovina" if NAMES_STD == "bn"
replace NAMES_STD = "Botswana" if NAMES_STD == "bs"
replace NAMES_STD = "Brazil" if NAMES_STD == "bl"
replace NAMES_STD = "British Virgin Islands" if NAMES_STD == "vb"
replace NAMES_STD = "Brunei" if NAMES_STD == "bx"
replace NAMES_STD = "Bulgaria" if NAMES_STD == "bu"
replace NAMES_STD = "Burkina Faso" if NAMES_STD == "uv"
replace NAMES_STD = "Burundi" if NAMES_STD == "bd"
replace NAMES_STD = "Cambodia" if NAMES_STD == "cb"
replace NAMES_STD = "Cameroon" if NAMES_STD == "cm"
replace NAMES_STD = "Canada" if NAMES_STD == "xxc"
replace NAMES_STD = "Cape Verde" if NAMES_STD == "cv"
replace NAMES_STD = "Cayman Islands" if NAMES_STD == "cj"
replace NAMES_STD = "Central African Republic" if NAMES_STD == "cx"
replace NAMES_STD = "Chad" if NAMES_STD == "cd"
replace NAMES_STD = "Chile" if NAMES_STD == "cl"
replace NAMES_STD = "China" if NAMES_STD == "ch"
replace NAMES_STD = "Christmas Islands" if NAMES_STD == "xa"
replace NAMES_STD = "Cocos Islands" if NAMES_STD == "xb"
replace NAMES_STD = "Colombia" if NAMES_STD == "ck"
replace NAMES_STD = "Comoros" if NAMES_STD == "cq"
replace NAMES_STD = "Democratic Republic of Congo" if NAMES_STD == "cg"
replace NAMES_STD = "Congo" if NAMES_STD == "cf"
replace NAMES_STD = "Cook Islands" if NAMES_STD == "cw"
replace NAMES_STD = "Costa Rica" if NAMES_STD == "cr"
replace NAMES_STD = "Cuba" if NAMES_STD == "cu"
replace NAMES_STD = "Croatia" if NAMES_STD == "ci"
replace NAMES_STD = "Cyprus" if NAMES_STD == "cy"
replace NAMES_STD = "Czech Republic" if NAMES_STD == "xr" | NAMES_STD == "cz"
replace NAMES_STD = "Czechoslovakia" if NAMES_STD == "cs"
replace NAMES_STD = "Denmark" if NAMES_STD == "dk"
replace NAMES_STD = "Djibouti" if NAMES_STD == "ft"
replace NAMES_STD = "Dominica" if NAMES_STD == "dq"
replace NAMES_STD = "Dominican Republic" if NAMES_STD == "dr"
replace NAMES_STD = "Ecuador" if NAMES_STD == "ec"
replace NAMES_STD = "Egypt" if NAMES_STD == "ua"
replace NAMES_STD = "El Salvador" if NAMES_STD == "es"
replace NAMES_STD = "Equatorial Guinea" if NAMES_STD == "eg"
replace NAMES_STD = "Eritrea" if NAMES_STD == "ea"
replace NAMES_STD = "Estonia" if NAMES_STD == "er" | NAMES_STD == "err"
replace NAMES_STD = "Ethiopia" if NAMES_STD == "et"
replace NAMES_STD = "Falkland Islands" if NAMES_STD == "fk"
replace NAMES_STD = "Faeroe Islands" if NAMES_STD == "fa"
replace NAMES_STD = "Fiji" if NAMES_STD == "fj"
replace NAMES_STD = "Finland" if NAMES_STD == "fi"
replace NAMES_STD = "France" if NAMES_STD == "fr"
replace NAMES_STD = "French Guiana" if NAMES_STD == "fg"
replace NAMES_STD = "French Polynesia" if NAMES_STD == "fp"
replace NAMES_STD = "Gabon" if NAMES_STD == "go"
replace NAMES_STD = "Gambia" if NAMES_STD == "gm"
replace NAMES_STD = "Georgia" if NAMES_STD == "gs" | NAMES_STD == "gsr"
replace NAMES_STD = "German Democratic Republic" if NAMES_STD == "ge"
replace NAMES_STD = "Germany" if NAMES_STD == "gw"
replace NAMES_STD = "Ghana" if NAMES_STD == "gh"
replace NAMES_STD = "Gibraltar" if NAMES_STD == "gi"
replace NAMES_STD = "Greece" if NAMES_STD == "gr"
replace NAMES_STD = "Greenland" if NAMES_STD == "gl"
replace NAMES_STD = "Grenada" if NAMES_STD == "gd"
replace NAMES_STD = "Guadeloupe" if NAMES_STD == "gp"
replace NAMES_STD = "Guam" if NAMES_STD == "gu"
replace NAMES_STD = "Guatemala" if NAMES_STD == "gt"
replace NAMES_STD = "Guinea" if NAMES_STD == "gv"
replace NAMES_STD = "Guinea-Bissau" if NAMES_STD == "pg"
replace NAMES_STD = "Guyana" if NAMES_STD == "gy"
replace NAMES_STD = "Haiti" if NAMES_STD == "ht"
replace NAMES_STD = "Honduras" if NAMES_STD == "ho"
replace NAMES_STD = "Hong Kong" if NAMES_STD == "hk"
replace NAMES_STD = "Hungary" if NAMES_STD == "hu"
replace NAMES_STD = "Iceland" if NAMES_STD == "ic"
replace NAMES_STD = "India" if NAMES_STD == "ii"
replace NAMES_STD = "Indonesia" if NAMES_STD == "io"
replace NAMES_STD = "Iran" if NAMES_STD == "ir"
replace NAMES_STD = "Iraq" if NAMES_STD == "iq"
replace NAMES_STD = "Ireland" if NAMES_STD == "ie"
replace NAMES_STD = "Israel" if NAMES_STD == "is"
replace NAMES_STD = "Italy" if NAMES_STD == "it"
replace NAMES_STD = "Cote d'Ivoire" if NAMES_STD == "iv"
replace NAMES_STD = "Jamaica" if NAMES_STD == "jm"
replace NAMES_STD = "Japan" if NAMES_STD == "ja"
replace NAMES_STD = "Jordan" if NAMES_STD == "jo"
replace NAMES_STD = "Kazakhstan" if NAMES_STD == "kz" | NAMES_STD == "kzr"
replace NAMES_STD = "Kenya" if NAMES_STD == "ke"
replace NAMES_STD = "Kiribati" if NAMES_STD == "gb"
replace NAMES_STD = "South Korea" if NAMES_STD == "ko"
replace NAMES_STD = "North Korea" if NAMES_STD == "kn"
replace NAMES_STD = "Kuwait" if NAMES_STD == "ku"
replace NAMES_STD = "Kyrgyz Republic" if NAMES_STD == "kg" | NAMES_STD == "kgr"
replace NAMES_STD = "Laos" if NAMES_STD == "ls"
replace NAMES_STD = "Latvia" if NAMES_STD == "lv" | NAMES_STD == "lvr"
replace NAMES_STD = "Lebanon" if NAMES_STD == "le"
replace NAMES_STD = "Lesotho" if NAMES_STD == "lo"
replace NAMES_STD = "Liberia" if NAMES_STD == "lb"
replace NAMES_STD = "Libya" if NAMES_STD == "ly"
replace NAMES_STD = "Liechtenstein" if NAMES_STD == "lh"
replace NAMES_STD = "Lithuania" if NAMES_STD == "li" | NAMES_STD == "lir"
replace NAMES_STD = "Luxembourg" if NAMES_STD == "lu"
replace NAMES_STD = "Macao" if NAMES_STD == "mh"
replace NAMES_STD = "Macedonia" if NAMES_STD == "xn"
replace NAMES_STD = "Madagascar" if NAMES_STD == "mg"
replace NAMES_STD = "Malawi" if NAMES_STD == "mw"
replace NAMES_STD = "Malaysia" if NAMES_STD == "my"
replace NAMES_STD = "Maldives" if NAMES_STD == "xc"
replace NAMES_STD = "Mali" if NAMES_STD == "ml"
replace NAMES_STD = "Malta" if NAMES_STD == "mm"
replace NAMES_STD = "Marshall Islands" if NAMES_STD == "xe"
replace NAMES_STD = "Martinique" if NAMES_STD == "mq"
replace NAMES_STD = "Mauritania" if NAMES_STD == "mu"
replace NAMES_STD = "Mauritius" if NAMES_STD == "mf"
replace NAMES_STD = "Mayotte" if NAMES_STD == "ot"
replace NAMES_STD = "Mexico" if NAMES_STD == "mx"
replace NAMES_STD = "Micronesia" if NAMES_STD == "fm"
replace NAMES_STD = "Moldova" if NAMES_STD == "mv" | NAMES_STD == "mvr"
replace NAMES_STD = "Monaco" if NAMES_STD == "mc"
replace NAMES_STD = "Mongolia" if NAMES_STD == "mp"
replace NAMES_STD = "Montenegro" if NAMES_STD== "mo"
replace NAMES_STD = "Montserrat" if NAMES_STD == "mj"
replace NAMES_STD = "Morocco" if NAMES_STD == "mr"
replace NAMES_STD = "Mozambique" if NAMES_STD == "mz"
replace NAMES_STD = "Myanmar" if NAMES_STD == "br"
replace NAMES_STD = "Namibia" if NAMES_STD == "sx"
replace NAMES_STD = "Nauru" if NAMES_STD == "nu"
replace NAMES_STD = "Nepal" if NAMES_STD == "np"
replace NAMES_STD = "Netherlands" if NAMES_STD == "ne"
replace NAMES_STD = "Netherlands Antilles" if NAMES_STD == "na"
replace NAMES_STD = "New Caledonia" if NAMES_STD == "nl"
replace NAMES_STD = "New Zealand" if NAMES_STD == "nz"
replace NAMES_STD = "Nicaragua" if NAMES_STD == "nq"
replace NAMES_STD = "Niger" if NAMES_STD == "ng"
replace NAMES_STD = "Nigeria" if NAMES_STD == "nr"
replace NAMES_STD = "Niue" if NAMES_STD == "xh"
replace NAMES_STD = "Norway" if NAMES_STD == "no"
replace NAMES_STD = "Oman" if NAMES_STD == "mk"
replace NAMES_STD = "Pakistan" if NAMES_STD == "pk"
replace NAMES_STD = "Palau" if NAMES_STD == "pw"
replace NAMES_STD = "Panama" if NAMES_STD == "pn"
replace NAMES_STD = "Papua New Guinea" if NAMES_STD == "pp"
replace NAMES_STD = "Paraguay" if NAMES_STD == "py"
replace NAMES_STD = "Peru" if NAMES_STD == "pe"
replace NAMES_STD = "Philippines" if NAMES_STD == "ph"
replace NAMES_STD = "Poland" if NAMES_STD == "pl"
replace NAMES_STD = "Portugal" if NAMES_STD == "po"
replace NAMES_STD = "Puerto Rico" if NAMES_STD == "pr"
replace NAMES_STD = "Qatar" if NAMES_STD == "qa"
replace NAMES_STD = "Reunion" if NAMES_STD == "re"
replace NAMES_STD = "Romania" if NAMES_STD == "rm"
replace NAMES_STD = "Russia" if NAMES_STD == "ru" | NAMES_STD == "rur" | NAMES_STD == "ur" | NAMES_STD == "xxr"
replace NAMES_STD = "Rwanda" if NAMES_STD == "rw"
replace NAMES_STD = "Saint Helena" if NAMES_STD == "xj"
replace NAMES_STD = "Saint Kitts and Nevis" if NAMES_STD == "xd"
replace NAMES_STD = "Saint Lucia" if NAMES_STD == "xk"
replace NAMES_STD = "Saint Pierre and Miquelon" if NAMES_STD == "xl"
replace NAMES_STD = "Saint Vincent and the Grenadines" if NAMES_STD == "xm"
replace NAMES_STD = "Samoa" if NAMES_STD == "ws"
replace NAMES_STD = "San Marino" if NAMES_STD == "sm"
replace NAMES_STD = "Sao Tome and Principe" if NAMES_STD == "sf"
replace NAMES_STD = "Saudi Arabia" if NAMES_STD == "su"
replace NAMES_STD = "Senegal" if NAMES_STD == "sg"
replace NAMES_STD = "Seychelles" if NAMES_STD == "se"
replace NAMES_STD = "Sierra Leone" if NAMES_STD == "sl"
replace NAMES_STD = "Singapore" if NAMES_STD == "si"
replace NAMES_STD = "Slovak Republic" if NAMES_STD == "xo"
replace NAMES_STD = "Slovenia" if NAMES_STD == "xv"
replace NAMES_STD = "Solomon Islands" if NAMES_STD == "bp"
replace NAMES_STD = "Somalia" if NAMES_STD == "so"
replace NAMES_STD = "South Africa" if NAMES_STD == "sa"
replace NAMES_STD = "Spain" if NAMES_STD == "sp"
replace NAMES_STD = "Sri Lanka" if NAMES_STD == "ce"
replace NAMES_STD = "Sudan" if NAMES_STD == "sj"
replace NAMES_STD = "South Sudan" if NAMES_STD == "so"
replace NAMES_STD = "Suriname" if NAMES_STD == "sr"
replace NAMES_STD = "Swaziland" if NAMES_STD == "sq"
replace NAMES_STD = "Sweden" if NAMES_STD == "sw"
replace NAMES_STD = "Switzerland" if NAMES_STD == "sz"
replace NAMES_STD = "Syria" if NAMES_STD == "sy"
//they use "china" for taiwan
replace NAMES_STD = "Tajikistan" if NAMES_STD == "ta" | NAMES_STD == "tar"
replace NAMES_STD = "Tanzania" if NAMES_STD == "tz"
replace NAMES_STD = "Thailand" if NAMES_STD == "th"
replace NAMES_STD = "Timor" if NAMES_STD == "em"
replace NAMES_STD = "Togo" if NAMES_STD == "tg"
replace NAMES_STD = "Tonga" if NAMES_STD == "to"
replace NAMES_STD = "Trinidad and Tobago" if NAMES_STD == "tr"
replace NAMES_STD = "Tunisia" if NAMES_STD == "ti"
replace NAMES_STD = "Turkey" if NAMES_STD == "tu"
replace NAMES_STD = "Turkmenistan" if NAMES_STD == "tk" | NAMES_STD == "tkr"
replace NAMES_STD = "Turks and Caicos Islands" if NAMES_STD == "tc"
replace NAMES_STD = "Tuvalu" if NAMES_STD == "tv"
replace NAMES_STD = "Uganda" if NAMES_STD == "ug"
replace NAMES_STD = "Ukraine" if NAMES_STD == "un" | NAMES_STD == "unr"
replace NAMES_STD = "United Arab Emirates" if NAMES_STD == "ts"
replace NAMES_STD = "United Kingdom" if NAMES_STD == "xxk" | NAMES_STD == "uk"
replace NAMES_STD = "United States" if NAMES_STD == "xxu" | NAMES_STD == "us"
replace NAMES_STD = "United States Virgin Islands" if NAMES_STD == "vi"
replace NAMES_STD = "Uruguay" if NAMES_STD == "uy"
replace NAMES_STD = "Uzbekistan" if NAMES_STD == "uz" | NAMES_STD == "uzr"
replace NAMES_STD = "Vanuatu" if NAMES_STD == "nn"
replace NAMES_STD = "Vatican" if NAMES_STD == "vc"
replace NAMES_STD = "Venezuela" if NAMES_STD == "ve"
replace NAMES_STD = "Vietnam" if NAMES_STD == "vm"
replace NAMES_STD = "Republic of Vietnam" if NAMES_STD == "vs"
replace NAMES_STD = "Wallis and Futuna" if NAMES_STD == "wf"
replace NAMES_STD = "Western Sahara" if NAMES_STD == "ss"
replace NAMES_STD = "Yemen" if NAMES_STD == "ye"
replace NAMES_STD = "Yemen People's Republic" if NAMES_STD == "ys"
replace NAMES_STD = "Yugoslavia" if NAMES_STD == "yu" | NAMES_STD == "rb"
replace NAMES_STD = "Zambia" if NAMES_STD == "za"
replace NAMES_STD = "Zimbabwe" if NAMES_STD == "rh"

end
exit
